lnd: only init wallet with root key if supported#799
lnd: only init wallet with root key if supported#799ekzyis wants to merge 1 commit intobitcoin-dev-project:mainfrom
Conversation
|
Instead of replacing the entire startup probe, can we add a flag (or even better, actual version parsing like this) and just leave out the macaroon root key option? What happens if the option is still left in, does lnd 15 refuse to start? I think the macaroon root key logic is mainly for friendly experimentation, and isn't used in battle games where each node has to have security from players, so I think this is generally an ok thing to do. |
Sounds good, I'll look into this, thanks!
The LND node starts, but it will wait forever for the wallet: because startupProbe times out: because this loop runs forever: until curl --fail --insecure https://localhost:8080/v1/initwallet --data "{\"macaroon_root_key\":\"{{ .Values.macaroonRootKey }}\", \"wallet_password\":\"AAAAAAAAAAA=\", \"cipher_seed_mnemonic\": $PHRASE}"; do
sleep 5
done(At least I'm pretty sure that's what's happening. k8s doesn't seem to expose the output of startupProbe.) Edit: Could be that I misunderstood what you meant with "What happens if the option is still left in". Maybe you didn't mean what currently happens ( |
d8bf25e to
5efdcc6
Compare
5efdcc6 now does this, and it's much better!
It now doesn't matter if I have tested this like this: (The |
This makes it possible to override
startupProbeof an LND node.This is required for bitcoin-dev-project/wrath-of-nalo#8 because lnd v0.15.5-beta does not support
macaroon_root_keyininitwallet. (Support was added in v0.16.0, see lightningnetwork/lnd#6457.I couldn't simply use
{{- toYaml .Values.startupProbe | nindent 8 }}and put the current default value into values.yaml similar tolivenessProbeetc. because{{ .Values.global.chain }}wouldn't get interpolated.This was tested by deploying the battlefield in bitcoin-dev-project/wrath-of-nalo#8 and inspecting the pod running lnd v0.15.5-beta.
TODO